﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CuaHangLego.Model
{
    public class SanPham : BaseModel
    {
        public int MaSo { get; set; }
        public string Ten { get; set; }
        public ChuDe ChuDe { get; set; }
        public int SoManhGhep { get; set; }
        public int GiaBan { get; set; }
        public DateTime NgaySX { get; set; }
        public int BaoHanh { get; set; }
        public string HinhAnh { get; set; }

        public SanPham()
            : base()
        {

        }

        public SanPham(int MaSo, string Ten, ChuDe ChuDe, int SoManhGhep, int GiaMua, int GiaBan, DateTime NgaySX, int BaoHanh, string HinhAnh)
            : this()
        {
            this.MaSo = MaSo;
            this.Ten = Ten;
            this.ChuDe = ChuDe;
            this.SoManhGhep = SoManhGhep;
            this.GiaBan = GiaBan;
            this.NgaySX = NgaySX;
            this.BaoHanh = BaoHanh;
            this.HinhAnh = HinhAnh;
        }

        public SanPham(SanPham sp)
            : this()
        {
            this.MaSo = sp.MaSo;
            this.Ten = sp.Ten;
            this.ChuDe = sp.ChuDe;
            this.SoManhGhep = sp.SoManhGhep;
            this.GiaBan = sp.GiaBan;
            this.NgaySX = sp.NgaySX;
            this.BaoHanh = sp.BaoHanh;
            this.HinhAnh = sp.HinhAnh;
            this.StateType = sp.StateType;
        }

        public override string ToString()
        {
            return this.Ten;
        }
    }
}
